desc=$1
APP_NAME=Loan
CONFIG=Release

xcodebuild clean -workspace LBKShell/LBKShell.xcworkspace -scheme ${APP_NAME} -configuration ${CONFIG}
xcodebuild archive -workspace LBKShell/LBKShell.xcworkspace -scheme ${APP_NAME} -configuration ${CONFIG} -destination generic/platform=iOS -archivePath ./build/${APP_NAME}.xcarchive
xcodebuild -exportArchive -archivePath ./build/${APP_NAME}.xcarchive -exportPath ./build -exportOptionsPlist ./export_prod.plist
#curl -F file=@./build/${APP_NAME}.ipa -F uKey=f4b5d6be4f33710307278f982cb760e8 -F _api_key=5e1253fbe144fd896eb454d745217311 -F updateDescription=${desc} http://www.pgyer.com/apiv1/app/upload
fir publish ./build/${APP_NAME}.ipa --open -c "$desc"
